package com.stu.mapper;

import com.stu.pojo.Complaint;
import com.stu.vo.ComplaintVo;
import com.stu.vo.StayApplicationVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ComplaintMapper {

    /**
     * 添加投诉信息
     * @param complaint
     */
    @Insert("insert into complaint(stu_id, complaint_reason, complaint_time, complaint_target) " +
            "VALUES (#{stuId}, #{complaintReason}, #{complaintTime}, #{complaintTarget} )")
    void insertComplaint(Complaint complaint);

    @Select("select * from complaint where stu_id = #{currentId}")
    List<ComplaintVo> selectComplaint(Long currentId);
}
